package org.example.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: tongqianwen
 * @Date: 2024/12/10
 */
@RestController
public class HelloWorld {
    @RequestMapping("/")
    public String hello() {
        return "hello, world";
    }

    @RequestMapping("/sayhi/{name}")
    public String greeting(@PathVariable String name) {
        return "hello, " + name;
    }
}
